<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
 <script type="text/javascript" src="../js/jquery-2.2.3.min.js"></script>
 <style type="text/css">
	.bgcolor{
	background-color: blue;
	color: red;
	}
</style>
<script type="text/javascript">
var user="";
$("#tit a").click(function(){
	e.preventDefault();//阻止a标签的默认事件
	$(this).addClass("bgcolor");//为当前标签添加bgcolor类
	$(this).siblings().removeClass("bgcolor");//移除当前元素的同级元素的bgcolor类
	});
$(function(){
		$.ajax({
			url:"/user/userMessage",
			type:"post",
			success:function(data){
				if(data.nickName==null || data.nickName==""){
				$("#totle").html("欢迎您:"+data.account)	
				}else{
				$("#totle").html("欢迎您:"+data.nickName)
				}
			}
		});
	});

</script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <a class="navbar-brand" href="../home.jsp" id="totle">用户</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-ex1-collapse" id="tit">
          <ul class="nav navbar-nav side-nav" >
          	<shiro:hasRole name="coach">
            <li><a href="coachBasic.html">我的信息</a></li>
           </shiro:hasRole>
            <shiro:hasRole name="student">
            <li><a href="studentBasic.html">我的信息</a></li>
           </shiro:hasRole>
             <shiro:hasRole name="gym">
            <li><a href="gymBasic.html">我的信息</a></li>
           </shiro:hasRole>          
           <shiro:hasRole name="coach">
            <li><a href="coachSafe.html">安全设置</a></li> 
             </shiro:hasRole>      
              <shiro:hasRole name="student">
            <li><a href="studentSafe.html">安全设置</a></li>
           </shiro:hasRole> 
            <shiro:hasRole name="gym">
            <li><a href="gymSafe.html">安全设置</a></li>
           </shiro:hasRole> 
            <li><a href="http://localhost:8080/logout" >注销 </a></li> 
          </ul>
          </div>
          </nav>

</body>
</html>